package com.echartsdata.Entityimp;

import com.alibaba.fastjson2.JSONObject;
import com.echartsdata.Mapper.BigdataMapper;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

//首页大数据接口实现类
@Component
public class BigdataMapperimp {
    @Resource
    private BigdataMapper bigdataMapper;
    public String get_sum_cont(){
        System.out.println("从接口数据返回的数据"+bigdataMapper.Get_sum());
        //json数据处理
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("data", bigdataMapper.Get_sum());
        System.out.println("转换后的json数据是"+jsonObject.toString());
        return jsonObject.toJSONString();

    }

}
